package cn.bailan.controller.restController;

import cn.bailan.entity.MoralBalance;
import cn.bailan.service.IUserService;
import cn.bailan.utils.TimeUtil;
import cn.bailan.utils.redis.RedisUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Author:甲粒子
 * Date: 2022/6/4
 * Description：
 */
@RestController
public class TestController {

    @Autowired
    RedisUtil redis;
    @Autowired
    IUserService userService;

    @RequestMapping("/test")
    public String test(){

        /*redis.set("mi","21016");
        Object mi = redis.get("mi");
        System.out.println(mi);*/

        /*MoralBalance moralBalance = new MoralBalance();
        moralBalance.setBadScore(-20);
        moralBalance.setGoodScore(5);
        moralBalance.setScore(-15);
        moralBalance.setUserId(123456);
        moralBalance.setUpTime(TimeUtil.getNowTime());
        userService.addMoralBalance(moralBalance);*/

        /*System.out.println(userService.getRTime(614446388));
        for (MoralBalance moralBalance : userService.getMoralBalanceList(846346539, 1, 10)) {
            System.out.println(moralBalance);
        }*/
        return "ok" ;

    }
}
